package com.hap.action;

import com.hap.service.UserService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class UserAction {
    private UserService userService;  //注入 IOC 控制反转 DI 依赖注入

    public void setUserService(UserService userService) {
        this.userService = userService;
    }

    public String addUser(HttpServletRequest request, HttpServletResponse response){
        userService.addUser();
        return "/index.jsp";
    }
}
